//
//  ZYPopLayerDisposeFactory.m
//  DesignMode
//
//  Created by wangzhipan on 2024/11/15.
//

#import "ZYPopLayerDisposeFactory.h"
#import "ZYPopLayerRequestFactory.h"


@implementation ZYPopLayerDisposeFactory
+ (ZYPopLayerDispose *)createDisposeWithPopLayerId:(nonnull NSString *)popLayerId
                                          isManual:(BOOL)isManual
                                         showBlock:(nonnull PopLayerShowCmd)showBlock
                                        closeBlock:(nonnull PopLayerCloseCmd)closeBlock
{
    
    id<IPopLayerRequest>request = [ZYPopLayerRequestFactory createRequestOfPopLayerId:popLayerId
                                                                             isManual:isManual
                                                                             showBlock:showBlock
                                                                             closeBlock:closeBlock
                                                                             interruptBlock:nil
                                                                             resumeCmd:nil];
    //这里查询引导后台返回的配置，设定request的优先级、遵守的弹出规则【是否打断正在展示的引导层、是否被打断后灰度、是否可以排队】
    return [[ZYPopLayerDispose alloc] initWithRequest:request];
}

+ (ZYPopLayerDispose *)createDisposeWithPopLayerId:(nonnull NSString *)popLayerId
                                          isManual:(BOOL)isManual
                                         showBlock:(nonnull PopLayerShowCmd)showBlock
                                        closeBlock:(nonnull PopLayerCloseCmd)closeBlock
                                    interruptBlock:(nonnull PopLayerInterruptCmd)interruptBlock
                                         resumeCmd:(nonnull PopLayerResumeCmd)resumeBlock
{
    id<IPopLayerRequest>request = [ZYPopLayerRequestFactory createRequestOfPopLayerId:popLayerId
                                                                             isManual:isManual
                                                                             showBlock:showBlock
                                                                             closeBlock:closeBlock
                                                                             interruptBlock:interruptBlock
                                                                             resumeCmd:resumeBlock];
    //这里查询引导后台返回的配置，设定request的优先级、遵守的弹出规则【是否打断正在展示的引导层、是否被打断后灰度、是否可以排队】
    return [[ZYPopLayerDispose alloc] initWithRequest:request];
}
@end
